#pragma once 
#include "HashBucket.hpp"

template<class K,class HashFunc=HashDefault<K>>
class unordered_set
{
  struct KeyOfSet 
  {
    const K& operator()(const K& key)
    {
      return key;
    }
  };
  
public:
  typedef typename HashBucket<K,K,KeyOfSet,HashFunc>::iterator iterator;   

  iterator begin()
  {
    return _ht.begin();
  }
  iterator end()
  {
    return _ht.end();
  }


  pair<iterator,bool> insert(const K& key)
  {
    return _ht.insert(key);
  }
  bool erase(const K& key)
  {
    return _ht.erase(key);
  }
  iterator find(const K& key)
  {
    return _ht.find(key);
  }

  void print()
  {
    _ht.printSet();
  }
  
private:
  HashBucket<K,K,KeyOfSet,HashFunc> _ht;
};
